import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  // 一级路由
  {
    name:"home",
    path:"/home",
    component:()=>import('../views/Home.vue')
  },
  // 一级课程路由
  {
    name:"kecheng",
    path:"/kecheng",
    component:()=>import('../views/Kecheng.vue'),
    children:[
      {
        path:"kejs",    
        component:()=>import('../views/Kejs.vue'),
        children:[
          {
            name:"js",
            path:"js",
            component:()=>import('../views/Js.vue')
          },
        ]
      },
      {
        name:"kephp",
        path:"kephp",   
        component:()=>import('../views/Kephp.vue')
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
